<?PHP
	// Path to smarty assembly
	require('../../smarty/libs/Smarty.class.php');
	// Creating a new smarty object and then setting the path to templates
	$smarty = new Smarty;
	$smarty->setTemplateDir('./smarty/templates/');
	$smarty->setCompileDir('./smarty/templates_c/');
	$smarty->setConfigDir('./smarty/configs/');
	$smarty->setCacheDir('./smarty/cache/');

//$smarty->force_compile = true;
$smarty->debugging = true;
$smarty->caching = true;
$smarty->cache_lifetime = 120;

$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill",true);
$smarty->assign("FirstName",array("John","Mary","James","Henry"));
$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
	  array("I", "J", "K", "L"), array("M", "N", "O", "P")));

$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
	  array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));

$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
$smarty->assign("option_selected", "NE");

$smarty->display('index.tpl');
	
	
	
	
	
	
	
	include("Json_class.php");
	
  //use latest minorRev 14
  $url  ='http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=5';
  $url .= '&apiKey=ukd47n3sahbbvpu247dknv5r';
  $url .= '&cid=55505';
  $url .= '&locale=en_US&city=Dallas&stateProvinceCode=TX&countryCode=US&numberOfResults=4';
  $url .= '&searchRadius=50';
	//using the cache returns results much faster
  $url .= '&supplierCacheTolerance=MED_ENHANCED';
	//dates and occupancy
  $url .='&arrivalDate=10/20/2012&departureDate=10/23/2012&room1=2';
  $url .='&_type=json';
  
  $header[] = "Accept: application/json";
  $header[] = "Accept-Encoding: gzip";
  
  $ch = curl_init();
  
  curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
  curl_setopt($ch,CURLOPT_ENCODING , "gzip");
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
  curl_setopt( $ch, CURLOPT_URL, $url );
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
  $response = json_decode(curl_exec($ch));
  ?>
  <html>
  <head>
  <style>
	*{ margin:0px; padding: 0px; }
	#header{
	  	background-color: #00ff00;
	  	height: 100px;
	  	width: 100%;
	}
	#page{
		background-color: #c0c0c0;
	  	margin: 0 auto;
	  	width: 100%;
		height: 50%;
	}
	
	#page #content{
		background-color: #800080;
		heigth: auto;
		margin: 0 auto;
		width: 1200px;
		 height: 100%;
	}
	#page #content #search-widget{
		background-color: #808000;
		display: inline-block;
		width: 500px;
		height: auto;
		float: left;
		margin-left: 15px;
		margin-right: 20px;
	}
	#page #content #destination-list{
		background-color: #008080;
		display: inline-block;
		width: 650px;
		float: left;
	}	
	#footer{
		width: 100%;
		height: 200px;
		background-color: #000080;
	}
	  
	#hotel-content{
	  	margin:0 auto;
	  	width: 70%;
	  	color:red;
	}
	.adults
	{
	width:60px;
	}
	.children
	{
	width:60px;
	}
	.first
	{
	display:inline;
	}
	.room
	{
	display: -moz-inline-box;
	}
	#destination-list
	{
	height:360px;
	
	}
	#input_destination input
	{
	width:300px;
	}
	#input_destination
	{
	padding:5px;
	}
	#input_destination_label
	{
		padding:5px;
	}
	#search_button_div
	{
	padding:5px;
	}
	#search_button_div input
	{
	float:right;
	}
	#check-in, #check-out
	{
	width:200px;
	
	}
	#check_in_check_out
	{
		display: -moz-inline-box;
	}
	#add_new_room_button
	{
		padding:5px;
	}
			
	#search-widget
	{
		padding-left:10px;
	}

	.age, .children, .adults 
	{
		display:inline;
		float:left;
	}
	#rooms
	{
		height: 200px;
	}
	#room1,	#room2,	#room2,	#room4,	#room5,	#room6,	#room7,	#room8
	{
	float:left;
	width: 100%;
	}
	
  </style>
  <meta charset="UTF-8" />
	<link type="text/css" href="./css/ui-darkness/jquery-ui-1.8.23.custom.css" rel="stylesheet" />
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.js"></script>
	<script type="text/javascript" src="./development-bundle/ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="./development-bundle/ui/jquery.ui.widget.js"></script>
	<script type="text/javascript" src="./development-bundle/ui/jquery.ui.position.js"></script>
	<script type="text/javascript" src="./development-bundle/ui/jquery.ui.autocomplete.js"></script>
	<!--<link type="text/css" href="/jquery-ui-1.8/demos.css" rel="stylesheet" />-->
	<script type="text/javascript">
	$(function() {
            $("#search_textbox").autocomplete({
            source: "search_autocomplete.php",
            minLength: 4,//search after two characters
            select: function(event,ui){
              alert ("XXX");
        //window.location.href = "index_backup.php";
      }
    });
	});
	</script>
  <script type="text/javascript">
	function add_room()
	{
		for(i=2;i<=8;i++)
		{	
			if(document.getElementById('room'+i).style.display=="none")
			{
			document.getElementById('room'+i).style.display="inline"
			break;
			}
			
		}
		
		
	}
  </script>
  
  </head>
  <body>
  	<div id="header">
  		<img src="" />
  	</div>
  	<div id="page">
  		<div id="content"> 
	  		<div id="search-widget">
			<div id="destination">
				<div id="input_destination_label">
					<label> 
					Where would you like to go?
					</label>
				</div>
				<div id="input_destination">
					<input id="search_textbox" type="textbox"  />
				</div>
	  		</div>
			<div id="check_in_check_out">
				<div id="check-in">
				Check-in
	  			<input type="textbox" />
				</div>
				<div id="check-out">
				Check-out
				
	  			<input type="textbox" />
	  			</div>
				</div>
			<div id="rooms">
<div id="room1" style="display:inline;">
    
    <div class="adults">
        <span class="label">Adults<br><span>(18+)</span></span>
        <select id="rooms0.adultsCount" name="rooms[0].adultsCount">
                <option value="1">1</option>
                <option selected="" value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
        </select>
    </div>
    
    <div class="children">
        <span class="label">Children<br><span>(0-17)</span></span>
        <select id="rooms0.childrenCount" name="rooms[0].childrenCount">
                <option selected="" value="0">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
        </select>
    </div>
    
    <div class="age">
        <legend>Age</legend><br>
        
                
                    <select id="rooms0.children1"  style="display:inline">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
        
                    <select id="rooms0.children2"    style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
            
                    <select id="rooms0.children3"  style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
		</div>
		
		
		
		</div>
		
		<div id="room2" style="display:none;">



    
    <div class="adults">
        
        <select id="rooms1.adultsCount">
                <option value="1">1</option>
                <option selected="" value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
        </select>
    </div>
    
    <div class="children">
        
        <select id="rooms1.childrenCount" >
                <option selected="" value="0">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
        </select>
    </div>
    
    <div>
        
        
                
                    <select id="rooms1.children1"  style="display:inline">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
        
                    <select id="rooms1.children2"    style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
            
                    <select id="rooms1.children3"  style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
		</div>
		</div>
		
		<div id="room3" style="display:none;">
			


    
    <div class="adults">
        
        <select id="rooms2.adultsCount">
                <option value="1">1</option>
                <option selected="" value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
        </select>
    </div>
    
    <div class="children">
        
        <select id="rooms2.childrenCount" >
                <option selected="" value="0">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
        </select>
    </div>
    
    <div>
        
        
                
                    <select id="rooms2.children1"  style="display:inline">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
        
                    <select id="rooms2.children2"    style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
            
                    <select id="rooms2.children3"  style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
		</div>
		</div>
		
		<div id="room4" style="display:none;">
		


    
    <div class="adults">
        
        <select id="rooms3.adultsCount">
                <option value="1">1</option>
                <option selected="" value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
        </select>
    </div>
    
    <div class="children">
        
        <select id="rooms3.childrenCount" >
                <option selected="" value="0">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
        </select>
    </div>
    
    <div>
        
        
                
                    <select id="rooms3.children1"  style="display:inline">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
        
                    <select id="rooms3.children2"    style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
            
                    <select id="rooms3.children3"  style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
		</div>
		</div>
		
		<div id="room5" style="display:none;">
		


    
    <div class="adults">
        
        <select id="rooms4.adultsCount">
                <option value="1">1</option>
                <option selected="" value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
        </select>
    </div>
    
    <div class="children">
        
        <select id="rooms4.childrenCount" >
                <option selected="" value="0">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
        </select>
    </div>
    
    <div>
        
        
                
                    <select id="rooms4.children1"  style="display:inline">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
        
                    <select id="rooms4.children2"    style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
            
                    <select id="rooms4.children3"  style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
		</div>
		</div>
	
		<div id="room6" style="display:none;">
		


    
    <div class="adults">
        
        <select id="rooms5.adultsCount">
                <option value="1">1</option>
                <option selected="" value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
        </select>
    </div>
    
    <div class="children">
        
        <select id="rooms5.childrenCount" >
                <option selected="" value="0">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
        </select>
    </div>
    
    <div>
        
        
                
                    <select id="rooms5.children1"  style="display:inline">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
        
                    <select id="rooms5.children2"    style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
            
                    <select id="rooms5.children3"  style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
		</div>
		</div>
		
		<div id="room7" style="display:none;">
		


    
    <div class="adults">
        
        <select id="rooms7.adultsCount">
                <option value="1">1</option>
                <option selected="" value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
        </select>
    </div>
    
    <div class="children">
        
        <select id="rooms7.childrenCount" >
                <option selected="" value="0">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
        </select>
    </div>
    
    <div>
        
        
                
                    <select id="rooms6.children1"  style="display:inline">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
        
                    <select id="rooms6.children2"    style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
            
                    <select id="rooms6.children3"  style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
		</div>
		</div>
		
		<div id="room8" style="display:none;">
		


    
    <div class="adults">
        
        <select id="rooms7.adultsCount">
                <option value="1">1</option>
                <option selected="" value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
        </select>
    </div>
    
    <div class="children">
        
        <select id="rooms7.childrenCount" >
                <option selected="" value="0">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
        </select>
    </div>
    
    <div>
        
        
                
                    <select id="rooms7.children1"  style="display:inline">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
        
                    <select id="rooms7.children2"    style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
            
                    <select id="rooms7.children3"  style="display: inline;">
                        <option value="">&mdash;</option>
                        <option value="0">&lt;1</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                        <option value="16">16</option>
                        <option value="17">17</option>
                    </select>
                
		</div>
		</div>
		
		</div>
		
		<div id="add_new_room_button">
			<input type="button" value="Add new room" onclick="add_room();"> </input>
		</div>
		<div id="search_button_div" >
			<input type="button" value="Search" ></input>
		</div>		
</div>
	  		<div id="destination-list">
				<?PHP
			    //print_r($url);
			    print_r("<BR>");
			    print_r("<pre>");
				
				$jsonObject= new Json($response);
				$hotelList = $jsonObject->GetHotelList();
				$hotelNumber = count($hotelList);
				print_r("Nr hotele: ".$hotelNumber);
				echo ">>".$hotelList[0]->GetLocationDescription();
				echo "<br>";
				print_r("<div id='hotel-content'>");
				for($i=0; $i<$hotelNumber ; $i++)
				{
					print_r("<span>");
					print_r($hotelList[$i]->GetLocationDescription().PHP_EOL);
					print_r("</span>");
					print_r("<img src='http://images.travelnow.com/".$hotelList[$i]->GetThumbnailUrl()."' \>");
				}
				print_r("</div>");	
				//$jsonObject->GetJsonRawData();
			 	print_r("</pre>");
			    ?>
	   		</div>
	   	</div>
	</div>
	<div id="footer">
	</div>
  </body>
</html>